<?php get_header(); ?>
<div id="content">
	 <?php if (have_posts()) :$i=0; while (have_posts()) : the_post(); ?>
		<div class="post posthome id="post-<?php the_ID(); ?>">
			<h2 class="posttitle">
			<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
			</h2>

			<div class='postdate'>
			<?php esc_attr( the_time('Y-m-d') ); ?> | 
			<?php the_category(',') ?> | 
			<?php if(comments_open() || pings_open()) : ?>
			<a href="<?php comments_link(); ?>" title="to Reply <?php the_title(); ?>">
				<?php comments_number('0','1','%'); ?> comments</a>
			<?php else : ?>
				评论关闭
			<?php endif; ?>
			</div>

			<div class="postcontent">
				<?php the_content('<span id="postmore">阅读全文 &raquo;</span>'); ?>
				<?php if ($wp_query->current_post == 0) ://广告区 ?>
				
				<?php endif; ?>
			</div>
		</div>

	<?php
		endwhile;
		else :
			echo walleve_404_message();
		endif;
	?>

	<?php if(!(is_page() || is_single()) ){ ?>
		<div id="pagenav">
			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
		</div>
	<?php } ?>
</div>
<?php walleve_sidebar() ?>
<?php get_footer(); ?>
